<template>
    <div v-html="xqy.goods_introduce">

    </div>
    <van-action-bar>
        <van-action-bar-icon icon="chat-o" text="客服" color="#ee0a24" />
        <van-action-bar-icon icon="cart-o" text="购物车" to="/homea/homec"/>
        <van-action-bar-icon icon="star" text="已收藏" color="#ff5000" />
        <van-action-bar-button type="warning" text="加入购物车" @click="add"/>
        <van-action-bar-button type="danger" text="立即购买" />
    </van-action-bar>
</template>

<script setup>
import { ref } from 'vue';
import axios from 'axios';
import { useRoute } from 'vue-router';
let route = useRoute()
let xqy = ref([])
axios.get('https://api-hmugo-web.itheima.net/api/public/v1/goods/detail', { params: { goods_id: route.query.goods_id } }).then(res => {
    xqy.value = res.data.message
})
import { useStore } from '../store';
const { GOU } = useStore()
const add = ()=>{
    GOU({...xqy.value,count:1,check:true})
}
</script>

<style></style>